{
	"info": {
		"_postman_id": "12cf985e-94c1-4794-9400-19abd0855cad",
		"name": "Протокол 1.3 Эндоскопия",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "37937048"
	},
	"item": [
		{
			"name": "Эндоскопические исследования",
			"item": [
				{
					"name": "предварительные условия",
					"item": [
						{
							"name": "импорт пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											"// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
											"\r",
											"// var requestdata = JSON.parse(pm.request.body.raw);\r",
											"// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
											"// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
											"\r",
											"// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
											"// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
											"// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
											"\r",
											"// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
											"// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
											"// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
											"// // --- Patient ----\r",
											"// let patientName = patient.name[0].family;\r",
											"// let patientDate = patient.birthDate;\r",
											"// let patientAddress = patient.address[0];\r",
											"// let patientIdentifier = patient.identifier[0];\r",
											"\r",
											"// console.log(pm.request.auth)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									},
									{
										"key": "X-Fhir-By-Version",
										"value": "latest",
										"type": "text",
										"disabled": true
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7001847A009PB2\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB7775\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "получение статуса импорта пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "поиск пациента по идентификационному номеру",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"patientId\", patientId);\r",
											"console.log(patientId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7001847A009PB2",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient"
									],
									"query": [
										{
											"key": "identifier",
											"value": "7001847A009PB2"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Кейс 1. Создание пациенту направления на эндоскопическое исследование",
					"item": [
						{
							"name": "Проверка отсутствия направления на эндоскопическое исследование",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestEndoscopy&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"ServiceRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/ServiceRequestEndoscopy"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации (создание направления))",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleFull\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"urn:{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-17\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleForTestPatientWithoutId\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7001847A009PB2\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB7775\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/EncounterFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"EncounterFullBundle\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"primary\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\",\r\n                    \"display\": \"Иванов Василий Васильевич\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-11-17\",\r\n                    \"end\": \"2025-11-17\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisAcuteAppendicitis\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisAcuteAppendicitis\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-02-03\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\",\r\n                                    \"display\": \"Острое течение заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K31.9\",\r\n                            \"display\": \"K31.9 - Болезнь желудка и двенадцатиперстной кишки неуточненная\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"onsetDateTime\": \"2025-12-17\",\r\n                \"recordedDate\": \"2025-11-17\",\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Болезнь желудка и двенадцатиперстной кишки неуточненная?\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleRequestGastroscopy\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleRequestGastroscopy\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestEndoscopy\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C064\",\r\n                                    \"display\": \"Эндоскопия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/RequestFromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"245543\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая помощь взрослому населению\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceTypeB\",\r\n                                \"code\": \"B01-058-001\",\r\n                                \"display\": \"Прием (осмотр, консультация) врача-эндоскописта первичный\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"orderDetail\": [\r\n                    {\r\n                        \"parameter\": [\r\n                            {\r\n                                \"code\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HealthcareServiceTypePart\",\r\n                                            \"code\": \"A03-16-001\",\r\n                                            \"display\": \"Эзофагогастродуоденоскопия\"\r\n                                        }\r\n                                    ]\r\n                                },\r\n                                \"valueString\": \"Эзофагогастродуоденоскопия\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                },\r\n                \"authoredOn\": \"2025-11-17\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                                    \"code\": \"K31.9\",\r\n                                    \"display\": \"K31.9 - Болезнь желудка и двенадцатиперстной кишки неуточненная\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationEndoskopiaId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Жалобы на периодические боли в животе, нарушение функции кишечника, эпизоды кровотечения\"\r\n                    }\r\n                ],\r\n                \"patientInstruction\": [\r\n                    {\r\n                        \"instructionMarkdown\": \"За 2-3 дня до исследования необходимо исключить алкоголь. За 12 часов (минимум 8 часов) до исследования необходимо исключить прием пищи. За 8 часов до исследования необходимо минимизировать прием жидкости (чистая негазированная вода). За 4 часа до исследования необходимо полностью прекратить употребление жидкости. Перед исследованием отказаться от курения, хотя бы за 2 часа.\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								},
								"description": "Это мой очень важный запрос на импорт данных"
							},
							"response": []
						},
						{
							"name": "Метод получения статуса операции импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Проверка создания направления на эндоскопическое исследование",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
											"console.log(serviceRequestId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestEndoscopy&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"ServiceRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/ServiceRequestEndoscopy"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Кейс 2. \t В амбулаторных условиях пациенту проводят Эзофагогастроинтестиноскопия (ФГДС) с биопсией слизистой желудка. Без осложнений",
					"item": [
						{
							"name": "Поиск диагноза",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let ConditionId = jsonData.entry.find(obj => obj.resource.resourceType === \"Condition\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"ConditionId\", ConditionId);\r",
											"console.log(ConditionId)"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Condition?_profile=https://fhir.by/StructureDefinition/FinalDiagnosis&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Condition"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/FinalDiagnosis"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Проверка наличия направления на эндоскопическое исследование",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestEndoscopy&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"ServiceRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/ServiceRequestEndoscopy"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации (создание процедуры))",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleFull\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"urn:{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-17\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleForTestPatientWithoutId\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7001847A009PB2\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB7775\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/EncounterFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"EncounterFullBundle\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfVisit\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfVisit\",\r\n                                    \"code\": \"primary\",\r\n                                    \"display\": \"первичное обращение\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                 \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{serviceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1234/8\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\",\r\n                    \"display\": \"Иванов Василий Васильевич\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleForHospitalisation}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-11-17\",\r\n                    \"end\": \"2025-11-17\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisAcuteAppendicitis\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisAcuteAppendicitis\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-11-17\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\",\r\n                                    \"display\": \"Острое течение заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K29.7\",\r\n                            \"display\": \"K29.7 - Гастрит неуточненный\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleForHospitalisation}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"onsetDateTime\": \"2025-12-17\",\r\n                \"recordedDate\": \"2025-11-17\",\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Гастрит неуточненный\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/Endoscopy\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"Endoscopy\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/SurgicalProcedure\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TermsOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                    \"code\": \"1\",\r\n                                    \"display\": \"амбулаторные\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AnesthesiaType\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnesthesiaType\",\r\n                                    \"code\": \"local\",\r\n                                    \"display\": \"местная анестезия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureUrgency\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ProcedureUrgency\",\r\n                                    \"code\": \"planned\",\r\n                                    \"display\": \"Плановое\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12469\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ProcedureType\",\r\n                                \"code\": \"diagnostic\",\r\n                                \"display\": \"Диагностическая\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/SurgicalInterventions\",\r\n                            \"code\": \"JDE005\",\r\n                            \"display\": \"Гастроскопия с биопсией\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Гастроскопия с биопсией\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2025-11-17T10:00:00Z\",\r\n                    \"end\": \"2025-11-17T10:30:00Z\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterFullBundle\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"endo\",\r\n                                    \"display\": \"врач-эндоскопист\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleForHospitalisation}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"surgical-sister\",\r\n                                    \"display\": \"медицинская сестра операционная\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{ExampleNurseRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": {\r\n                    \"reference\": \"Location/{{LocationId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"preoperative\",\r\n                                    \"display\": \"Диагноз до вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/{{ConditionId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"postoperative\",\r\n                                    \"display\": \"Диагноз после вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Выполнено местное обезболивание. Пищевод свободно проходим. Слизистая пищевода бледно-розовой окраски. Розетка кардии смыкается полностью. В желудке слизь. Складки извитые, сочные. Слизистая желудка умеренно гиперемированная, отечная. Привратник округлой формы, проходим. Слизистая луковицы 12 п.к. бледно-розовой окраски. Взята биопсия из желудка, слизистая оболочка.\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								},
								"description": "Это мой очень важный запрос на импорт данных"
							},
							"response": []
						},
						{
							"name": "Метод получения статуса операции импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Проверка изменения статуса направления",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestEndoscopy&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"ServiceRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/ServiceRequestEndoscopy"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Проверка создания процедуры",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/SurgicalProcedure&patient={{patientId}}",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Procedure"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/SurgicalProcedure"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Кейс 3. В условиях стационара пациенту проводят операцию с эндоскопическим вмешательством, во время которого удаляют полип толстой кишки:",
					"item": [
						{
							"name": "Метод проверки отсутствия направления на госпитализацию",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
											"console.log(serviceRequestId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestHospitalisation&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"ServiceRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/ServiceRequestHospitalisation"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Создание направления на госпитализацию",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleFull\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"urn:{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-17\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                        \r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleForTestPatientWithoutId\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7001847A009PB2\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB7775\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/EncounterFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"EncounterFullBundle\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfVisit\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfVisit\",\r\n                                    \"code\": \"primary\",\r\n                                    \"display\": \"первичное обращение\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                 \"identifier\": [\r\n                    {\r\n                        \"value\": \"1234/7\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"primary\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    \r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-11-17T11:30:00Z\",\r\n                    \"end\": \"2025-11-17T11:45:00Z\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisAcuteAppendicitis\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisAcuteAppendicitis\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-11-16\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\",\r\n                                    \"display\": \"Острое течение заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K63.9\",\r\n                            \"display\": \"K63.9 - Болезнь кишечника неуточненная\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    \r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"onsetDateTime\": \"2025-12-16\",\r\n                \"recordedDate\": \"2025-11-16\",\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Болезнь кишечника неуточненная?\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleServiceRequestHospitalisation\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleServiceRequestHospitalisation\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestHospitalisation\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C064\",\r\n                                    \"display\": \"Эндоскопия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/RequestFromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12347\",\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-16T12:00:00Z\",\r\n                            \"end\": \"2026-11-15T12:00:00Z\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/2\",\r\n                                \"display\": \"Стационарная медицинская помощь взрослому населению\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HospitalisationGoals\",\r\n                                \"code\": \"treatment\",\r\n                                \"display\": \"консервативное лечение\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"orderDetail\": [\r\n                    {\r\n                        \"parameter\": [\r\n                            {\r\n                                \"code\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HealthcareServiceTypePart\",\r\n                                            \"code\": \"A03-18-001\"\r\n                                        }\r\n                                    ]\r\n                                },\r\n                                \"valueString\": \"Толстокишечная Эндоскопия\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterFullBundle\"\r\n                },\r\n                \"occurrenceDateTime\": \"2025-12-17T12:00:00Z\",\r\n                \"authoredOn\": \"2025-11-16T12:00:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationEndoskopiaId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Для эндоскопического вмешательства и дообследования\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса операции импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия направления на госпитализацию",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
											"console.log(serviceRequestId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestHospitalisation&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"ServiceRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/ServiceRequestHospitalisation"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Создание ресурса  госпитализации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleFull\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"urn:{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-17\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleForTestPatientWithoutId\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7001847A009PB2\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB7775\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisAcuteAppendicitis\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisAcuteAppendicitis\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-11-16\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\",\r\n                                    \"display\": \"Острое течение заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K63.9\",\r\n                            \"display\": \"K63.9 - Болезнь кишечника неуточненная\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"onsetDateTime\": \"2025-11-16\",\r\n                \"recordedDate\": \"2025-11-16\",\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Болезнь кишечника неуточненная?\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"EpisodeOfCare/ExampleHospitalisationPlanStart\",\r\n            \"resource\": {\r\n                \"resourceType\": \"EpisodeOfCare\",\r\n                \"id\": \"ExampleHospitalisationPlanStart\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/Hospitalisation\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaidType\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HospitalisationPaidType\",\r\n                                            \"code\": \"optional-insurance\",\r\n                                            \"display\": \"добровольное медицинское страхование\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/InsurancePolicyNumber\",\r\n                                        \"valueString\": \"AO39198215\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/DateIssueInsurancePolicy\",\r\n                                        \"valueDate\": \"2025-06-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PeriodTemporaryInsurancePolicy\",\r\n                                        \"valuePeriod\": {\r\n                                            \"start\": \"2025-06-01\",\r\n                                            \"end\": \"2026-05-31\"\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/InsuranceOrganization\",\r\n                                        \"valueString\": \"АГСРСтрах\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HealthInsurance\"\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaid\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DiagnosisOfSendingOrganisation\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SequenceNumbeHospitalisation\",\r\n                        \"valuePositiveInt\": 2\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"123/6\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\",\r\n                                \"display\": \"специализированная\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/HospitalisationReasonUse\",\r\n                                    \"code\": \"11\",\r\n                                    \"display\": \"Плановая госпитализация с целью эндоскопического вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": [\r\n                            {\r\n                                \"concept\": {\r\n                                    \"text\": \"Для эндоскопического вмешательства и дообследования\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\",\r\n                                    \"display\": \"Предварительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                },\r\n                \"managingOrganization\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"period\": {\r\n                    \"start\": \"2023-09-01\"\r\n                },\r\n                \"referralRequest\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{serviceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"careManager\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRoleId}}\"\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса операции импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Поиск диагноза",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let ConditionId = jsonData.entry.find(obj => obj.resource.resourceType === \"Condition\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"ConditionId\", ConditionId);\r",
											"console.log(ConditionId)"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Condition?_profile=https://fhir.by/StructureDefinition/FinalDiagnosis&_sort=-_lastUpdated&code=K63.9",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Condition"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/FinalDiagnosis"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										},
										{
											"key": "code",
											"value": "K63.9"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия ресурсов госпитализации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let episodOfCareId = jsonData.entry.find(obj => obj.resource.resourceType === \"EpisodeOfCare\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"episodOfCareId\", episodOfCareId);\r",
											"console.log(episodOfCareId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/EpisodeOfCare?_profile=https://fhir.by/StructureDefinition/Hospitalisation&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"EpisodeOfCare"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/Hospitalisation"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки отсутствия у пациента процедур эндоскопического исследования",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/SurgicalProcedure&patient={{patientId}}&code=JFSA15",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Procedure"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/SurgicalProcedure"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "code",
											"value": "JFSA15"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации (создание эндоскопического исследования)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleFull\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"urn:{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-17\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionFullBundle\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleForTestPatientWithoutId\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleForTestPatientWithoutId\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7001847A009PB2\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Ивов\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Васильевич\"\r\n                        ],\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"89001234567\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1989-01-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"1104112119\",\r\n                                            \"display\": \"Брестская область, Барановичский район, Крошинский с/с, д. Подлесейки\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"postalCode\": \"212011\",\r\n                        \"text\": \"Брестская область, Барановичский район, Крошинский с/с, д. Подлесейки, д.19 кв. 11, 212011\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisAcuteAppendicitis\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisAcuteAppendicitis\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-11-17\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\",\r\n                                    \"display\": \"Острое течение заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K92.2\",\r\n                            \"display\": \"K92.2 — Желудочно-кишечное кровотечение неуточненное\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleTerapevtId}}\",\r\n                            \"display\": \"Иванов Владислав Эдуардович\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"onsetDateTime\": \"2025-12-17\",\r\n                \"recordedDate\": \"2025-11-17\",\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Желудочно-кишечное кровотечение неуточненное\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ProcedureEndoscopy\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"Endoscopy\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/SurgicalProcedure\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/InpatientMedicalRecord\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"EpisodeOfCare/{{episodOfCareId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TermsOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"стационарные\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AnesthesiaType\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnesthesiaType\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общая анестезия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureUrgency\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ProcedureUrgency\",\r\n                                    \"code\": \"planned\",\r\n                                    \"display\": \"Плановое\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12469\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ProcedureType\",\r\n                                \"code\": \"non-oncological-diseases\",\r\n                                \"display\": \"По поводу неонкологических заболеваний\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/SurgicalInterventions\",\r\n                            \"code\": \"JFSA15\",\r\n                            \"display\": \"Эндоскопическая полипэктомия в толстой кишке\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Эндоскопическая полипэктомия в толстой кишке\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleForTestPatientWithoutId\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2025-11-17T10:00:00Z\",\r\n                    \"end\": \"2025-11-17T10:30:00Z\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"endo\",\r\n                                    \"display\": \"врач-эндоскопист\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleForHospitalisation}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"surgical-sister\",\r\n                                    \"display\": \"медицинская сестра операционная\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{ExampleNurseRole}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"anesthetist\",\r\n                                    \"display\": \"врач-анестезиолог-реаниматолог\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRoleForHospitalisation}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": {\r\n                    \"reference\": \"Location/{{LocationId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"preoperative\",\r\n                                    \"display\": \"Диагноз до вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/{{ConditionId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"postoperative\",\r\n                                    \"display\": \"Диагноз после вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisAcuteAppendicitis\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"complication\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"text\": \"Развитие осложнения в виде кровотечения из ложа резекции полипа. Проведён эндоскопический гемостаз, кровотечение остановлено.\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Колоноскоп введен до купола слепой кишки, осмотр выполнен по ходу вывода аппарата. В нисходящей ободочной кишке визуализирован полип на ножке, выполнена его эндоскопическая   резекция с помощью диатермической петли. После удаления полипа отмечено развитие кровотечения  из ложа резекции. Проведены эндоскопические гемостатические мероприятия. Кровотечение купировано.  Слизистая остальных отделов толстой кишки без выраженной патологии. \"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса операции импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия у пациента процедур эндоскопического исследования",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/SurgicalProcedure&patient={{patientId}}&code=JFSA15",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Procedure"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/SurgicalProcedure"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "code",
											"value": "JFSA15"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Методы проверки выполнения требований поиска FHIR-ресурсов «Procedure» в контексте пациента",
					"item": [
						{
							"name": "Метод проверки выполнения требований поиска FHIR-ресурса «Procedure» в контексте пациента",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"let response = pm.response.json();\r",
											"\r",
											"let procedureId = response.entry.find(e => e.resource.resourceType === \"Procedure\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"procedureId\", procedureId);"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/SurgicalProcedure&terms-service=2&urgency=planned&status=completed&category=non-oncological-diseases&occurrence=2025-11-17&patient={{patientId}}&performer={{PractitionerRoleForHospitalisation}}&location={{LocationId}}&reason-funct-diagn=postoperative&type-of-service=free&reason-reference={{ConditionId}}&code=JFSA15",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Procedure"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/SurgicalProcedure"
										},
										{
											"key": "terms-service",
											"value": "2"
										},
										{
											"key": "urgency",
											"value": "planned"
										},
										{
											"key": "status",
											"value": "completed"
										},
										{
											"key": "category",
											"value": "non-oncological-diseases"
										},
										{
											"key": "occurrence",
											"value": "2025-11-17"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "performer",
											"value": "{{PractitionerRoleForHospitalisation}}"
										},
										{
											"key": "location",
											"value": "{{LocationId}}"
										},
										{
											"key": "reason-funct-diagn",
											"value": "postoperative"
										},
										{
											"key": "type-of-service",
											"value": "free"
										},
										{
											"key": "reason-reference",
											"value": "{{ConditionId}}"
										},
										{
											"key": "code",
											"value": "JFSA15"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Методы проверки выполнения требований получения FHIR-ресурсов «Procedure», в контексте пациента",
					"item": [
						{
							"name": "Метод проверки выполнения требований получения FHIR-ресурса «Procedure» в контексте пациента",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure/{{procedureId}}",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"Procedure",
										"{{procedureId}}"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Методы проверки выполнения требований предоставления сводной медицинской информации о пациенте по идентификатору пациента",
					"item": [
						{
							"name": "Методы проверки выполнения требований предоставления сводной медицинской информации о пациенте по идентификатору пациента",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/$everything?start=2025-10&end=2025-12",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient",
										"{{patientId}}",
										"$everything"
									],
									"query": [
										{
											"key": "start",
											"value": "2025-10"
										},
										{
											"key": "end",
											"value": "2025-12"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		}
	],
	"auth": {
		"type": "oauth2",
		"oauth2": [
			{
				"key": "useBrowser",
				"value": true,
				"type": "boolean"
			},
			{
				"key": "clientId",
				"value": "mis_agsr_web_application",
				"type": "string"
			},
			{
				"key": "tokenName",
				"value": "iehr",
				"type": "string"
			},
			{
				"key": "authUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/auth",
				"type": "string"
			},
			{
				"key": "accessTokenUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/token",
				"type": "string"
			},
			{
				"key": "refreshRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "tokenRequestParams",
				"value": [
					{
						"key": "Origin",
						"value": "https://oauth.pstmn.io/v1/callback",
						"enabled": true,
						"send_as": "request_header"
					}
				],
				"type": "any"
			},
			{
				"key": "authRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "challengeAlgorithm",
				"value": "S256",
				"type": "string"
			},
			{
				"key": "redirect_uri",
				"value": "https://oauth.pstmn.io/v1/callback",
				"type": "string"
			},
			{
				"key": "grant_type",
				"value": "authorization_code_with_pkce",
				"type": "string"
			},
			{
				"key": "addTokenTo",
				"value": "header",
				"type": "string"
			},
			{
				"key": "client_authentication",
				"value": "body",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "patientId",
			"value": ""
		},
		{
			"key": "bundleId",
			"value": ""
		},
		{
			"key": "StatusUrl",
			"value": ""
		},
		{
			"key": "serviceRequestId",
			"value": ""
		},
		{
			"key": "episodOfCareId",
			"value": ""
		},
		{
			"key": "ConditionId",
			"value": "",
			"type": "default"
		},
		{
			"key": "procedureId",
			"value": ""
		}
	]
}